<?php
namespace app\admin\validate;
use think\Validate;

/**
 * 积分操作信息验证器
 * Created by PhpStorm.
 * User: tyll
 * Date: 2019/11/28
 * Time: 15:07
 */
class IntegralOperate extends Validate{

    protected $rule = [
        'openid'   => 'require',
        'integral' => 'require|integer',
        'explain'  => 'require'
    ];

    protected $message = [
        'openid.require'   => '用户必须填写',
        'integral.require' => '积分必须填写',
        'integral.integer' => '积分填写错误',
        'explain.require'  => '说明必须填写'
    ];

    protected $scene = [
        'add'  => ['openid','integral','explain'],
        'edit' => ['openid','integral','explain']
    ];
}